/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 30318
 * Date: 2023-05-13
 * Time: 8:29
 */
public class Test {

    public static void main(String[] args) {
        //fori
        /*for (int i = 0; i < 100; i++) {
            System.out.println(i);
        }*/

        /*int sum = 0;
        for(int i = 1; i <= 5; i++){
            int ret = 1;
            for(int j = 1; j <= i; j++){
                ret *= j;
            }
            sum += ret;
        }
        System.out.println(sum);*/

        /*for(;;){
            System.out.println("haha");
        }*/

        //do while至少会循环一次
        int num = 1;
        do{
            System.out.println(num);
            num++;
        }while(num <= 0);
    }

    public static void main11(String[] args) {
        int i = 1;
        while(i <= 100){
            if(i%15 != 0){
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }

    public static void main10(String[] args) {
        int a = 10;
        while(a >= 0){
            if(a == 9){
                continue;
                //break;
            }
            a--;
        }
    }

    public static void main9(String[] args) {
        /*int a = 1;
        while(a >= 0){//while括号内必须是布尔值
            System.out.println("hehe");
        }*/

        int num = 1;
        while(num <= 10);{
            System.out.println(num);
            num++;
        }
    }

    public static void main8(String[] args) {

        int sum = 0;
        int n = 1;
        while(n <= 5){
            int i = 1;
            int ret = 1;
            while(i <= n){
                ret *= i;
                i++;
            }
            sum += ret;
            n++;
        }
        System.out.println(sum);
    }

    public static void main7(String[] args) {
        int i = 1;
        int ret = 1;
        while(i <= 5){
            ret *= i;
            i++;
        }
        System.out.println(ret);
    }

    public static void main6(String[] args) {
        //1-100的和
        //1-100的奇数和
        //1-100的偶数和

        int i=1;
        int sum = 0;
        int sumOdd = 0;
        int sumEven = 0;
        while(i <= 100){
            if(i%2 == 0){
                sumEven += i;
            }else{
                sumOdd += i;
            }
            sum += i;
            i++;
        }
        System.out.println(sum);
        System.out.println(sumOdd);
        System.out.println(sumEven);
    }

    public static void main5(String[] args) {
        //1-10
        int i = 1;
        while(i <= 10){
            System.out.println(i);
            i++;
        }
    }

    public static void main4(String[] args) {
        //不能做switch的参数的数据类型是哪些？
        //long float double boolean - 会报错
        /*long a = 2;
        switch(a){
            case 1:
                System.out.println("one");
                break;
            case 2:
                System.out.println("two");
                break;
            default:
                System.out.println("没有匹配！");
                break;
        }*/
    }

    public static void main3(String[] args) {
        int a = 2;
        switch(a){
            case 1:
                System.out.println("one");
                break;
            case 2:
                System.out.println("two");
                break;
            default:
                System.out.println("没有匹配！");
                break;
        }
    }

    public static void main2(String[] args) {

        /*int x = 20;
        if(x == 10){
            System.out.println("haha");
        }*/

        /*int x = 20;
        if(x == 10);
        {
            System.out.println("haha");
        }*/

        /*Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();

        for(int year = 1000; year < num; year++){
            if(year % 100 != 0){
                if(year % 4 == 0){
                    System.out.println(year+"is leapYear! ");
                }
            }else{
                if(year % 400 == 0){
                    System.out.println(year+"is leapYear! ");
                }
            }
        }*/

        //Scanner 工具    System.in:键盘
        /*Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        //int b = scanner.nextInt();
        if(a % 2 == 0){
            System.out.println("偶数");
        }else{
            System.out.println("奇数");
        }*/

        /*Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        if(num > 0){
            System.out.println("正数");
        }else if(num < 0){
            System.out.println("负数");
        }else{
            System.out.println("0");
        }*/
    }

    public static void main1(String[] args) {
        /*System.out.println("1");
        System.out.println("2");
        System.out.println("3");
        System.out.println("4");*/
        /*int a = 1;
        if(a == 1){

        }*/
        int score = 10;
        if(score >= 90){
            System.out.println("优秀");
        }else if(score >= 80 && score < 90){
            System.out.println("良好");
        }else if(score >= 70 && score < 80){
            System.out.println("中等");
        }else if(score >= 60 && score < 70){
            System.out.println("及格");
        }else if(score >=0 && score < 60){
            System.out.println("不及格");
        }else{
            System.out.println("错误数据");
        }
    }
}
